package com.foreknow.trains.train6;

public class Circle implements ShapePara {
    public double radius;//半径

    private double x;
    protected double y;

    public Circle(double radius){
        this.radius = radius;
    }

    public double getRadius() {
        return radius;
    }

    public void setCenter(double x,double y){
        this.x=x;
        this.y=y;
        System.out.println("圆心坐标为：("+x+","+y+")");
    }

    public void setRadius(double radius){
        this.radius=radius;
    }

    @Override
    public int getArea() {
        int area= (int) (Math.PI*(radius*radius));
        System.out.println("圆的面积为："+area);
        return area;
    }

    @Override
    public int getCircumference() {
        int cir=(int) (2*Math.PI*radius);
        System.out.println("圆的周长为："+cir);
        return cir;
    }
/*
    public static void main(String[] args) {
        Circle circle = new Circle(3);
        int a=circle.getArea();
        System.out.println(a);
    }*/
}
